package com.briup.cms.exception;

import com.briup.cms.utils.MessageStatus;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

public class CategoryException extends RuntimeException{
    private static final long serialVersionUID = -1170457450324724193L;

    private MessageStatus messageStatus;
    private Logger logger = LoggerFactory.getLogger(CategoryException.class);

    public CategoryException(String message) {
        super(message);
        logger.error(message);
    }
    public CategoryException(MessageStatus messageStatus) {
        super(messageStatus.message());
        this.messageStatus = messageStatus;
        logger.error(messageStatus.message());
    }
    public MessageStatus getMessageStatus() {
        return messageStatus;
    }
}
